package model;

import java.util.Random;

public class MonteCarloThreadSteps extends Thread {
	public MonteCarloSimulation mcs;
	private Random rand = new Random();
	
	public MonteCarloThreadSteps(MonteCarloSimulation mcs) {
		super();
		this.mcs = mcs;
	}

	synchronized public void ssSteps() {
		mcs.setStockPrice(mcs.getStockPrice() * Math.exp(mcs.getDrift() + mcs.getVSqrdt() * rand.nextGaussian()));
	}
	
	public void run() {
		ssSteps();		
	}
}
